home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-x400ops-charactersets-01.txt < prev    next >
Text File  |  1993-03-03  |  39KB  |  1,138 lines

  1.  
  2. draft            X.400 use of extended character sets           Apr 92
  3.  
  4.  
  5.                    X.400 use of extended character sets
  6.  
  7.                        Fri Nov  6 15:13:56 MET 1992
  8.  
  9.  
  10.                          Harald Tveit Alvestrand
  11.                                SINTEF DELAB
  12.                     Harald.Alvestrand@delab.sintef.no
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.     Status of this Memo
  20.  
  21.     This draft document is being circulated for comment.
  22.  
  23.     If consensus is reached it may be submitted to the RFC editor as a
  24.     Proposed Standard protocol specificiation, for use in X.400 in the
  25.     Internet.
  26.  
  27.     Please send comments to the author, or to the RARE WG-MSG list
  28.     <wg-msg@rare.nl>.
  29.  
  30.     The following text is required by the Internet-draft rules:
  31.  
  32.     This document is an Internet Draft.  Internet Drafts are working
  33.     documents of the Internet Engineering Task Force (IETF), its
  34.     Areas, and its Working Groups. Note that other groups may also
  35.     distribute working documents as Internet Drafts.
  36.  
  37.     Internet Drafts are draft documents valid for a maximum of six
  38.     months. Internet Drafts may be updated, replaced, or obsoleted by
  39.     other documents at any time.  It is not appropriate to use
  40.     Internet Drafts as reference material or to cite them other than
  41.     as a "working draft" or "work in progress."
  42.  
  43.     Please check the I-D abstract listing contained in each Internet
  44.     Draft directory to learn the current status of this or any other
  45.     Internet Draft.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. Alvestrand                 Expires May 6 93                   [Page 1]
  55.  
  56. draft            X.400 use of extended character sets           Apr 92
  57.  
  58.  
  59.     1.  Introduction
  60.  
  61.     Since 1988, X.400 has had the capacity for carrying a large number
  62.     of different character sets in a message by using the body part
  63.     "GeneralText" defined by ISO/IEC 10021-7.
  64.  
  65.     Since 1992, the Internet also has the means of passing around
  66.     messages containing multiple character sets, by using the
  67.     mechanism defined in RFC-MIME.
  68.  
  69.     This document defines a suggested method of using "GeneralText" in
  70.     order to harmonize as much as possible the usage of this body
  71.     part.
  72.  
  73.  
  74.     2.  General principles
  75.  
  76.     2.1.  Goals
  77.  
  78.     The target of this memo is to define a way of using existing
  79.     standards to achieve:
  80.  
  81.  
  82.     (1)  in the short term, a standard for sending E-mail in the
  83.          European languages (Latin letters with European accents,
  84.          Greek and Cyrillic)
  85.  
  86.     (2)  in the medium term, extending this to cover the Hebrew and
  87.          Arabic character sets
  88.  
  89.     (3)  in the long term, opening up true international E-mail by
  90.          allowing the full character set specified in ISO-10646 to be
  91.          used.
  92.  
  93.  
  94.     The author believes that this document gives a specification that
  95.     can easily accomodate the use of any character set in the ISO
  96.     registry, and, by giving guidance rules for choosing character
  97.     sets, will help interworking.
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. Alvestrand                 Expires May 6 93                   [Page 2]
  109.  
  110. draft            X.400 use of extended character sets           Apr 92
  111.  
  112.  
  113.     2.2.  Families of character sets
  114.  
  115.  
  116.     2.2.1.  ISO 6937/T.61
  117.  
  118.     ISO 6937 is a code technique used and recommended in T.51 and
  119.     T.101 (Teletex and Videotex service) and in X.500, providing a
  120.     repertoire of 333 characters from the Latin script by use of non-
  121.     spacing diacritical marks. It corresponds closely to CCITT
  122.     recommendation T.61.
  123.  
  124.     The problem with that technique is that the character stream comes
  125.     in two modes, i.e some characters are coded with one byte and some
  126.     with two (composite characters). This makes information processing
  127.     systems such as an E-mail UA or GW more complex.
  128.  
  129.     It is also not extensible to other languages like Korean or
  130.     Chinese, or even Greek, without invoking the character set
  131.     switching techniques of ISO 2022.
  132.  
  133.  
  134.     2.2.2.  ISO 8859
  135.  
  136.     ISO 8859 defines a set of character sets, each suitable for use in
  137.     some group of languages. Each character in ISO 8859 is coded in a
  138.     single byte.
  139.  
  140.     There are currently 9 parts of ISO 8859, plus a "supplementary"
  141.     set, registered as ISO IR 154. All languages using single-byte
  142.     characters can be written in one or another of the ISO 8859 sets.
  143.     There are sets covering Greek, Hebrew and Arabic.
  144.  
  145.     All the ISO 8859 sets include US ASCII as a subset. All use 8
  146.     bits.
  147.  
  148.     ISO 8859 is regarded by many as a solution; for instance, the X
  149.     windows system now comes with ISO-8859-1 as the "standard"
  150.     character set, with the possibility of specifying others. But
  151.     since the same applications often do not support character set
  152.     switching within text, it is problematic to use these in a truly
  153.     multilingual environment.  (Also, most fonts claiming to be "ISO-
  154.     8859-1" in X11R5 are actually 7-bit fonts. The implied lie is very
  155.     unfortunate.)
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162. Alvestrand                 Expires May 6 93                   [Page 3]
  163.  
  164. draft            X.400 use of extended character sets           Apr 92
  165.  
  166.  
  167.     It turns out to work fine, however, if the second language is
  168.     English, since this can be written in all ISO 8859 sets.
  169.  
  170.     The parts 3 and 4 have not seen wide acceptance, and it is
  171.     expected that they will be discarded. They should therefore not be
  172.     used.
  173.  
  174.  
  175.     2.2.3.  ISO 10646
  176.  
  177.     At the moment of writing, ISO 10646 has just been accepted as an
  178.     International Standard. It is basically a 32-bit character set,
  179.     with all of the currently used characters being numbered by the
  180.     first 16 bits, leaving some room for expansion.
  181.  
  182.     It is not possible to use ISO 10646 as a normal character set,
  183.     because it does not conform to the rules for usage of byte values
  184.     set down in ISO 2022 and other places; it uses the "control space"
  185.     for (parts of) graphic character codes.
  186.  
  187.     There are a number of ways to encode ISO 10646 characters "on the
  188.     wire". There are methods within the ISO 2022 standard to switch to
  189.     these, either as "other coding system without return" or as "other
  190.     coding system with return" (that is, you can go back from it to
  191.     the one you came from using an ISO 2022 escape sequence).
  192.  
  193.     The following registrations have been made:
  194.  
  195.  
  196.     ISO 10646 UCS-2 Level 1 has been registered with ESC 2/5 2/15 4/0,
  197.     ISO 10646 UCS-4 Level 1 has been registered with ESC 2/5 2/15 4/1,
  198.  
  199.     The following are applied for:
  200.  
  201.     Reg# Escape sequence  Standard/Sponsor   Description
  202.     174  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-2, Level 2
  203.     175  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-4, Level 2
  204.     176  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-2, Level 3
  205.     177  ESC 2/5 2/15 F   ISO/IEC 10646      UCS-4, Level 3
  206.     178  ESC 2/5 F        ISO/IEC 10646      UTF-1
  207.  
  208.     << NOTE: The registration numbers for UCS-2 level 1 and UCS-4
  209.     level 1 are not known. Neither are the assigned final characters
  210.     for the other sets. Information requested!>>
  211.  
  212.  
  213.  
  214.  
  215.  
  216. Alvestrand                 Expires May 6 93                   [Page 4]
  217.  
  218. draft            X.400 use of extended character sets           Apr 92
  219.  
  220.  
  221.     This character set will become very important in the future, but
  222.     at the moment, few systems are able to support this directly.
  223.  
  224.     The GeneralText body part can be used for carrying any of these
  225.     character sets.
  226.  
  227.  
  228.     2.3.  Body parts that can be used in X.400
  229.  
  230.     At the moment, no established way of transferring a full set of
  231.     characters in X.400-based E-mail exists.  In the future, it is
  232.     likely that a new body part, based in ISO 10646, will be
  233.     available; it is, however, dangerous to try to specify this body
  234.     part before ISO 10646 is final.
  235.  
  236.     In the short term, the deployed and available body parts are:
  237.  
  238.  
  239.     (1)  IA5Text
  240.  
  241.     (2)  For X.400/84: ISO6937Text and Teletex
  242.  
  243.     (3)  For X.400/88: GeneralText
  244.  
  245.     IA5Text is the method of choice for E-mail that contains only
  246.     characters from IA5 (equivalent to ASCII).
  247.  
  248.     The ISO6937Text body part is defined in the ISO DIS documents
  249.     corresponding to X.400(84) [MOTIS-86]; these never became a
  250.     standard, so they are now quite difficult to find. It is in
  251.     principle limited to using text that can be presented in ISO 6937,
  252.     but since ISO 6937 refers to the ISO 2022 method of changing
  253.     character sets, it is theoretically possible to use any ISO
  254.     registered character set, but there is no facility for announcing
  255.     the character sets used. This makes interworking with equipment
  256.     that does not support the same character sets complex.
  257.  
  258.     It is still, however, the only body part suitable for carrying
  259.     non-paginated text in non-basic character sets in X.400(84).
  260.  
  261.     Teletex, which is identical in all versions of the X.400 standard,
  262.     has the same problem of implicit ISO6937, but has the added
  263.     problem that it also specifies a page format, with, for instance,
  264.     a left margin of 5 character positions. This is often not
  265.  
  266.  
  267.  
  268.  
  269.  
  270. Alvestrand                 Expires May 6 93                   [Page 5]
  271.  
  272. draft            X.400 use of extended character sets           Apr 92
  273.  
  274.  
  275.     desirable.
  276.  
  277.     The details of Teletex are specified in recommendation T.51 and
  278.     its relatives.
  279.  
  280.     GeneralText is defined in ISO 10021-8, the part of [MOTIS] that
  281.     corresponds to CCITT recommendation [X.420]. It is an Extended
  282.     body part, so no modification to CCITT implementations is needed
  283.     to carry it.
  284.  
  285.     GeneralText is suitable for interchange, since it has got proper
  286.     announcement facilities. It can use any number of character sets,
  287.     and announces them both in the Encoded Information Types of the
  288.     X.400 envelope and the parameters of the body part.
  289.  
  290.     We recommend this body part for carrying unformatted text in
  291.     X.400/88.
  292.  
  293.  
  294.     3.  GUIDELINES FOR THE GENERATION OF GENERALTEXT
  295.  
  296.  
  297.     3.1.  Formal definition of GeneralText
  298.  
  299.     A GeneralText message is a byte stream that contains characters
  300.     and character switching sequences according to [ISO 2022].
  301.  
  302.     The X.400 ASN.1 definition of the GeneralText body part is:
  303.  
  304.  
  305.     general-text-body-part EXTENDED-BODY-PART-TYPE
  306.         PARAMETERS GeneralTextParameters IDENTIFIED BY id-ep-general-text
  307.         DATA       GeneralTextData
  308.         ::= id-et-general-text
  309.  
  310.     GeneralTextParameters ::= SET OF CharacterSetRegistration
  311.  
  312.     CharacterSetRegistration ::= INTEGER (1..32767)
  313.  
  314.     GeneralTextData ::= GeneralString
  315.  
  316.  
  317.     The definition is from ISO/IEC 10021-7 [MOTIS], Annex I, with
  318.     modifications made in the MHS Implementor' Guide, version 8,
  319.  
  320.  
  321.  
  322.  
  323.  
  324. Alvestrand                 Expires May 6 93                   [Page 6]
  325.  
  326. draft            X.400 use of extended character sets           Apr 92
  327.  
  328.  
  329.     chapter 3.6.3, bullet F130. It does not appear in the CCITT
  330.     version of the standards.
  331.  
  332.  
  333.     3.2.  Brief description of ISO 2022 character set switching
  334.  
  335.     There are 4 graphic character sets active at any time in a
  336.     GeneralText message, called G0, G1, G2 and G3. In addition, there
  337.     are 2 control character sets, called C0 and C1.
  338.  
  339.     At any moment, one of the sets G0-G3 is active in code positions
  340.     2/1 to 7/14, and another is active in code positions 10/0 to
  341.     15/15. The setting is achieved by so-called "locking shift"
  342.     sequences.
  343.  
  344.     (Formally, code positions 2/0 and 7/15 are reserved for "space"
  345.     and "DEL" respectively, and only 94-character character sets can
  346.     be used in G0. In practice, this restriction is sometimes ignored)
  347.  
  348.     Single characters from the non-active sets may be invoked by the
  349.     use of "single shift" sequences.
  350.  
  351.     The control character sets always occupy the code positions 0/0 to
  352.     1/15 (C0) and 8/0 to 9/15 (C1).
  353.  
  354.     The character sets currently active as G0-G3 and C0-C1 may be
  355.     changed using "character set designating sequences".
  356.  
  357.     At the beginning of a GeneralText message, one must always assume
  358.     that set 2 (IA5) is active as G0, shifted into the lower half,
  359.     that set 1 (standard) is active as C0, and that no G1-G3 or C1 set
  360.     is invoked. This is specified in the definition of "GeneralString"
  361.     in [X.209], the definition of ASN.1 encoding (section 23.5.2).
  362.  
  363.     If this is not a suitable initial state, a message must always
  364.     start with the necessary announcers and escape sequences to
  365.     designate and invoke the character sets that are actually used.
  366.     The character sets in use may be changed later in the message by
  367.     use of escape sequences.
  368.  
  369.     The parameters of a GeneralText message always list all the
  370.     character sets used, by quoting their ISO reference numbers.
  371.  
  372.     It is impossible to use a character set not registered with ISO in
  373.  
  374.  
  375.  
  376.  
  377.  
  378. Alvestrand                 Expires May 6 93                   [Page 7]
  379.  
  380. draft            X.400 use of extended character sets           Apr 92
  381.  
  382.  
  383.     a GeneralText message.
  384.  
  385.     It is also impossible to decide on the true meaning of a byte in a
  386.     GeneralText message without scanning the whole message for shift
  387.     and escape sequences.
  388.  
  389.  
  390.     3.3.  How to use the character sets
  391.  
  392.     RECOMMENDATION:
  393.  
  394.     When the text to be rendered is representable in one of the
  395.     character sets of ISO-8859, the G0 set should be set to ISO 646
  396.     International Reference Version (1991), also called US-ASCII,
  397.     ISO-IR-6.
  398.  
  399.     The older character set ISO-IR-2, ISO 646 IRV(1983), should NOT be
  400.     used.  This means that the escape sequence ESC 2/8 4/2
  401.     (designating ASCII as G0) should always occur at the beginning of
  402.     the message.
  403.  
  404.     The G1 set should be set to the relevant ISO-8859 part. G2 and G3
  405.     are not used.
  406.  
  407.     This corresponds to the first level of ISO 4873 usage.
  408.  
  409.     For the currently defined parts of ISO 8859, the character set
  410.     designations are (relative to ISO 8859:1987):
  411.  
  412.     Part    ISO IR name             Escape sequence Remarks
  413.                                     for G1 use
  414.  
  415.     1       ISO-IR-100              Esc 2D 41       West Europe
  416.     2       ISO-IR-101              Esc 2D 42       East European
  417.     3       ISO-IR-109              Esc 2D 43
  418.     4       ISO-IR-110              Esc 2D 44
  419.     5       ISO-IR-144              Esc 2D 4C       Cyrillic
  420.     6       ISO-IR-127              Esc 2D 47       Arabic
  421.     7       ISO-IR-126              Esc 2D 46       Greek
  422.     8       ISO-IR-138              Esc 2D 48       Hebrew
  423.     9       ISO-IR-148              Esc 2D 4D       Baltic, Turkish
  424.  
  425.     NOTE: The use of ISO 8859-3 and ISO 8859-4 is NOT recommended if
  426.     other possibilities exist.
  427.  
  428.  
  429.  
  430.  
  431.  
  432. Alvestrand                 Expires May 6 93                   [Page 8]
  433.  
  434. draft            X.400 use of extended character sets           Apr 92
  435.  
  436.  
  437.     The G1 set should be permanently shifted into the upper half of
  438.     the code page.
  439.  
  440.     When the text is not representable in one of the ISO-8859
  441.     character sets, the following rules may be applied:
  442.  
  443.  
  444.     (1)  If any Latin characters are used, keep IA5 as the G0 set.
  445.  
  446.     (2)  If a mainstream character set is used (Greek, Cyrillic,
  447.          Hebrew, Arabic), designate this as the G1 character set, and
  448.          permanently shift this into the upper half of the code page
  449.          (LS1R).
  450.          EXCEPTION: The Japanese community has a long tradition of
  451.          switching between the Japanese 16-bit character set ISO-IR-87
  452.          and USASCII as the G0 set. See [RFC-2022-JP] for details. If
  453.          ISO-IR-87 is used, that technique should be used instead of
  454.          the one recommended here.
  455.  
  456.     (3)  If occasional extensions to a character set that is basically
  457.          Latin occur (like accents, national variants and so on), and
  458.          these are available in a single character set, designate the
  459.          relevant set as G2 and use single shift (SS2) to invoke
  460.          characters from this character set.
  461.  
  462.          The ISO 8859 supplementary set, ISO-IR-154, is recommended
  463.          for this purpose.
  464.  
  465.          This corresponds to the ISO 4873 "second level" application.
  466.  
  467.     (4)  If two non-Latin character sets are used, the second should
  468.          be designated as G3, and shifted into the upper half of the
  469.          code page by the use of Locking Shift 3 Right (LS3R).
  470.  
  471.          This corresponds to the ISO 4873 "third level" application.
  472.  
  473.  
  474.     (5)  If avoidable, use of character sets with floating accents,
  475.          like ISO 6937, should be avoided.
  476.  
  477.     (6)  The shifts changing the lower half of the code table (SI/SO,
  478.          LS2 and LS3) should NOT be used.
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486. Alvestrand                 Expires May 6 93                   [Page 9]
  487.  
  488. draft            X.400 use of extended character sets           Apr 92
  489.  
  490.  
  491.     RATIONALE: Keeping the G0 set reserved for ASCII will ensure that
  492.     text in ASCII has the same bit representation always.
  493.  
  494.     The use of the upper code page for other scripts ensures that both
  495.     text in these languages and text of this type mixed with English
  496.     can be represented without the use of shift sequences.
  497.  
  498.     If the language and/or content of a text is completely unknown,
  499.     chapter 5 gives an algorithm that may be used to decide upon the
  500.     character sets. This might, for instance, be suitable for use at
  501.     automatic mail gateways.
  502.  
  503.     NOTE: At the time of this writing, few applications that use ISO
  504.     4873 level 2 and level 3 encoding exist. It has been estimated
  505.     that implementing them in an application that already uses a rich
  506.     repertoire of characters is a matter of programmer-days, not
  507.     programmer-months, but this has not been proven.
  508.  
  509.  
  510.     4.  GUIDELINES FOR THE RENDERING OF GENERALTEXT
  511.  
  512.     As a basic rule, one should NOT assume that any of the rules above
  513.     are followed.
  514.  
  515.     An user agent capable of rendering GeneralText should:
  516.  
  517.  
  518.     (1)  ALWAYS be able to identify and render characters in IA5, no
  519.          matter how they are designated and invoked.
  520.  
  521.     (2)  ALWAYS be able to identify and render characters in the
  522.          "native" character sets, no matter how they are designated
  523.          and invoked.
  524.  
  525.     (3)  ALWAYS indicate the presence of characters that cannot be
  526.          adequately represented on the current output device.
  527.  
  528.     (4)  NEVER render a character in an unknown or unrepresentable
  529.          character set by displaying the character in the same bit
  530.          position in the native character set.
  531.  
  532.     (5)  PREFERABLY be able to identify and render characters that are
  533.          the same as characters in the "native" character sets, even
  534.          though they are designated and invoked as part of other
  535.  
  536.  
  537.  
  538.  
  539.  
  540. Alvestrand                 Expires May 6 93                  [Page 10]
  541.  
  542. draft            X.400 use of extended character sets           Apr 92
  543.  
  544.  
  545.          character sets.  This applies in particular to the
  546.          "invariant" part of ISO 8859, parts 1 through 6.
  547.  
  548.     (6)  PREFERABLY be able to combine the floating accents of ISO
  549.          6937 with their base characters for suitable rendering using
  550.          the capabilities of the current output device.
  551.  
  552.     (7)  PREFERABLY be able to display text both in a mode using
  553.          fallbacks for nonrenderable characters and in a mode
  554.          designating nonrenderable characters as such.
  555.  
  556.     (8)  PREFERABLY be able to save the content of a GeneralText
  557.          message to a file or other suitable media, saving all
  558.          character set information, for later processing by other
  559.          means.  It is not illegal to render the character set
  560.          information into a different format; however, it should be
  561.          noted that it is easy to lose vital information if the format
  562.          chosen for representing character sets does not offer the
  563.          possibility of referencing all character sets in the ISO
  564.          registry of character sets.
  565.  
  566.     These requirements also apply to gateways that transform the
  567.     message into some other format, for example a gateway that
  568.     transforms a message into MIME using [RFC-2022-JP] for the
  569.     purpose.
  570.  
  571.  
  572.     5.  RECOMMENDATION FOR SELECTION OF CHARACTER SETS
  573.  
  574.  
  575.     5.1.  Algorithm for selection of character sets
  576.  
  577.     When one has text in which characters from several character sets
  578.     occurs, and wants to process this into a GeneralText document, it
  579.     is often hard to guess right at the character sets to select.
  580.  
  581.     The following paragraphs give an algorithm that can be started at
  582.     the beginning of a message, and at the end of it, return a set of
  583.     character sets that can be used as G0..G3 character sets, OR an
  584.     indication that the task is impossible.
  585.  
  586.     VARIABLES:
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594. Alvestrand                 Expires May 6 93                  [Page 11]
  595.  
  596. draft            X.400 use of extended character sets           Apr 92
  597.  
  598.  
  599.     UsedSets
  600.          The set of character sets that MUST be used for this message
  601.  
  602.     UsableSets
  603.          The set of character sets that MAY be used for this message.
  604.          Each set also contains a counter for each character position.
  605.  
  606.     PossibleSets
  607.          The set of all the character sets known to be usable in the
  608.          destination format.
  609.  
  610.          ALGORITHM:
  611.  
  612.     1)   Add IA5 (ISO-IR-6) to the UsedSets (as G0).
  613.  
  614.     2)   Get the next character of the text.  If the text is
  615.          completely analyzed, go to FINISHED
  616.  
  617.     3)   If it is in the UsedSets, go to 2).
  618.  
  619.     4)   Find the set of character sets from PossibleSets in which the
  620.          character occurs. If it does not occur in any, report
  621.          failure.
  622.  
  623.     5)   If it is in a single character set in PossibleSets only, add
  624.          this set to UsedSets, and go to 2).
  625.  
  626.     6)   If it is in more than one character set, add these to
  627.          PossibleSets (if not already present), and increment the
  628.          counter for that character in all the sets. Go to 2).
  629.  
  630.     FINISHED)
  631.  
  632.     1)   (FINAL SELECTION) Remove any character set in UsedSets from
  633.          PossibleSets.
  634.  
  635.          Zero the counters for any character in PossibleSets that also
  636.          occurs in UsedSets.
  637.          WHILE (more characters left)
  638.            Select one character set and move it from PossibleSets to UsedSets.
  639.            Zero the counters for all characters in this set in the other
  640.            PossibleSets.
  641.          END WHILE
  642.          This step can be "tuned" any way you want, for instance by
  643.  
  644.  
  645.  
  646.  
  647.  
  648. Alvestrand                 Expires May 6 93                  [Page 12]
  649.  
  650. draft            X.400 use of extended character sets           Apr 92
  651.  
  652.  
  653.          choosing the character sets most likely to be understood at
  654.          the destination first, choosing the character sets covering
  655.          the most characters first, avoiding multi-byte character sets
  656.          as long as possible, or any other scheme suitable for the
  657.          application.
  658.  
  659.     5.2.  WHAT TO DO ON FAILURE
  660.  
  661.     Failure will occur in this schema if a character is found that is
  662.     not in the PossibleSets. It may then be handled in one of the
  663.     following ways:
  664.  
  665.     (1)  Replace the character with the SUB control character
  666.  
  667.     (2)  Replace the character with Keld Simonsen Mnemonics. This is a
  668.          reversible transformation as long as the recipient is aware
  669.          that it has been used, but requires passing out-of-band
  670.          information to indicate this.
  671.  
  672.     (3)  Replace the lost characters with any suitable fallback or
  673.          mnemonic scheme intended for human understanding
  674.  
  675.     (4)  Bounce the message/refuse the conversion/give up.
  676.  
  677.     The action to be taken may be different based on the percentage of
  678.     "lost" characters.
  679.  
  680.     If the message has "controls" like "conversion with loss
  681.     prohibited", only the last possibility may be used.
  682.  
  683.  
  684.     5.3.  RECOMMENDED CHARACTER SETS
  685.  
  686.     There are 2 steps in the algorithm above that are left for local
  687.     judgement:
  688.  
  689.     (1)  Selection of the sets to appear in PossibleSets.
  690.  
  691.     (2)  The algorithm for deciding which character set to select in
  692.          step 9.
  693.  
  694.     In the context of generating X.400 GeneralText messages, the
  695.     following is recommended:
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702. Alvestrand                 Expires May 6 93                  [Page 13]
  703.  
  704. draft            X.400 use of extended character sets           Apr 92
  705.  
  706.  
  707.     Sets in PossibleSets:
  708.     ISO-IR-6        Esc 28 42 (G0)  US-ASCII, IA5, ISO646
  709.     ISO-IR-100      Esc 2D 41 (G1)  ISO-8859-1      West Europe
  710.     ISO-IR-101      Esc 2D 42 (G1)  ISO-8859-2      Central/Eastern Europe
  711.     ISO-IR-144      Esc 2D 4C (G1)  ISO-8859-5      Cyrillic
  712.     ISO-IR-127      Esc 2D 47 (G1)  ISO-8859-6      Arabic
  713.     ISO-IR-126      Esc 2D 46 (G1)  ISO-8859-7      Greek
  714.     ISO-IR-138      Esc 2D 48 (G1)  ISO-8859-8      Hebrew
  715.     ISO-IR-148      Esc 2D 4D (G1)  ISO-8859-9      Baltic/Nordic/Turkish
  716.  
  717.     The following multi-byte character sets are recommended:
  718.  
  719.     ISO-IR-87 (Japanese JIS C6226-1983)     Esc 24 29 42 (G1)
  720.     ISO-IR-149 (Korean KS C 5601-1989)      Esc 24 29 43 (G1)
  721.     ISO-IR-58 (Chinese GB 2312-80)          Esc 24 29 41 (G1)
  722.  
  723.     It is a STRONG recommendation that character sets not listed
  724.     above, which do not add any new characters to the total set of
  725.     characters given by the character sets above, should NOT be used
  726.     in X.400 interchange.
  727.  
  728.     ISO-IR-87 is the Japanese character set that is allowed in a
  729.     Teletex string, such as the subject field.
  730.  
  731.     NOTE: ISO-IR-87 has been "superseded" by ISO-IR-168, which allows
  732.     two extra Kanji characters. Any application that handles ISO-IR-87
  733.     should also be able to handle ISO-IR-168.
  734.  
  735.     Algorithm for selecting character sets:
  736.  
  737.     Start at the top of the list above, and add each set only if it is
  738.     needed.
  739.  
  740.  
  741.     5.4.  Selecting a character set based on language
  742.  
  743.     If the most common language of the environment in which it is used
  744.     is known, the following character sets are recommended.
  745.  
  746.     The table of Latin-script languages is based on work by Johan van
  747.     Wingen.  <BUTPAA@rulmvs.leidenuniv.nl>. The others are best
  748.     guesses by the author.
  749.  
  750.     The tables of character sets prepared by Keld Jorn Simonsen
  751.  
  752.  
  753.  
  754.  
  755.  
  756. Alvestrand                 Expires May 6 93                  [Page 14]
  757.  
  758. draft            X.400 use of extended character sets           Apr 92
  759.  
  760.  
  761.     <keld@dkuug.dk> (RFC-KELD) were invaluable in matching the data on
  762.     languages to the data on character sets.
  763.  
  764.     Again, these are intended for guidance, not enforcement; there is
  765.     considerable prestige atttached to such recommendations in other
  766.     contexts, and it is therefore likely that each language group will
  767.     make appropriate decisions on this subject. The table below is
  768.     intended as a compilation of existing knowledge, again on the
  769.     principle that it is better to say something than to say nothing.
  770.  
  771.     The language codes (for those languages that have codes) come from
  772.     ISO 639.
  773.  
  774.     NOTE: ISO 639 is a very incomplete list of the world's languages
  775.     (perhaps 10 or 20 % according to some experts), and is undergoing
  776.     revision. The only reason for using it is that it is the only
  777.     ISO-standardized shorthand notation for languages available at the
  778.     moment.
  779.  
  780.     Language                  1   2   3   4   5
  781.     ------------------------------------------------------------
  782.     sq Albanian               X   X   X
  783.     eu Basque                 X       X
  784.     br Breton                 X
  785.     hr Croatian                   X
  786.     cs Czech                      X
  787.     da Danish                 X
  788.     eo Esperanto                          X
  789.     fo Faeroese               X
  790.     fi Finnish                X   X   X
  791.     fy Frisian                X
  792.     ?? Gaelic                 X
  793.     gl Galician               X       X
  794.     de German                 X       X
  795.     hu Hungarian                  X
  796.     is Icelandic              X
  797.     ga Irish                  X   X   X
  798.     it Italian                X
  799.     no Norwegian              X       X
  800.     pl Polish                     X
  801.     pt Portuguese             X
  802.     ?? Rhaetian               X
  803.     ro Romanian                   X
  804.     sk Slovak                     X
  805.  
  806.  
  807.  
  808.  
  809.  
  810. Alvestrand                 Expires May 6 93                  [Page 15]
  811.  
  812. draft            X.400 use of extended character sets           Apr 92
  813.  
  814.  
  815.     sl Slovenian                  X
  816.     ?? Sorbian                    X
  817.     es Spanish                X       X
  818.     sv Swedish                X       X
  819.     tr Turkish                        X
  820.  
  821.     Explanation of character set codes
  822.     ----------------------------------------
  823.      1: ISO_8859-1:1987
  824.      2: ISO_8859-2:1987
  825.      3: ISO_8859-9:1989
  826.      4: ISO_8859-supp
  827.      5: ISO_8859-2:1987 and ISO_8859-supp
  828.  
  829.  
  830.     Other languages for which appropriate character sets are known are
  831.     listed in the table below.
  832.  
  833.     Language        Character set
  834.  
  835.     ar Arabic       ISO-8859-6
  836.     be Byelorussian ISO-8859-5
  837.     bg Bulgarian    ISO-8859-5
  838.     el Greek        ISO-8859-7
  839.     en English      USASCII
  840.     fa Persian      ISO-8859-6
  841.     iw Hebrew       ISO-8859-8
  842.     ja Japanese     ISO-IR-87 (Japanese JIS C6226-1983)
  843.     ko Korean       ISO-IR-149 (Korean KS C 5601-1989)
  844.     la Latin        USASCII
  845.     lo Laotian      ISO-IR-166
  846.     ru Russian      ISO-8859-5
  847.     sw Swahili      USASCII
  848.     th Thai         ISO-IR-166
  849.     uk Ukrainian    ISO-8859-5
  850.     ur Urdu         ISO-8859-6
  851.     vo Volapuk      ISO-8859-1
  852.     zh Chinese      ISO-IR-58 (Chinese GB 2312-80)
  853.  
  854.     Additional entries in this table are welcome!
  855.  
  856.     Some languages have only one or a few characters missing. These
  857.     are listed below.
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864. Alvestrand                 Expires May 6 93                  [Page 16]
  865.  
  866. draft            X.400 use of extended character sets           Apr 92
  867.  
  868.  
  869.     Language        Character set           Missing
  870.  
  871.        Sami         ISO-8859-9              C with caron
  872.                                             D with stroke
  873.                                             I with diaeresis
  874.                                             N with acute
  875.                                             Eng
  876.                                             S with caron
  877.                                             T with stroke
  878.                                             Z with caron
  879.     kl Greenlandic  ISO-8859-1              I with tilde
  880.                                             K with cedilla
  881.                                             U with tilde
  882.     cy Welsh        ISO-8859-1              W with acute
  883.                                             W with grave
  884.                                             W with diaeresis
  885.                                             Y with grave
  886.                                             Y with circumflex
  887.     nl Dutch        ISO-8859-1              Ligature IJ
  888.     af Afrikaans    ISO-8859-1              N preceded by apostrophe
  889.     fr French       ISO-8859-1              Ligature OE
  890.     ca Catalan      ISO-8859-1              L with middle dot
  891.  
  892.     According to comments received, the "problem characters" for
  893.     Dutch, Afrikaans, French, Greenlandic and Catalan are not in
  894.     common use, or may be avoided by use of alternate spelling (like
  895.     using "ij" instead of the "Ligature IJ").
  896.  
  897.     For French, Dutch, Catalan and Afrikaans, the character set ISO
  898.     6937-2, which uses floating diacritical marks, contains all
  899.     required characters.
  900.  
  901.     The following languages can (to the author's limited knowledge) be
  902.     written with the current ISO 10646 standard, but with no other
  903.     registered character sets:
  904.  
  905.  
  906.     Language               Country(ies)             Script(s)
  907.  
  908.     aa Afar                 Somalia, Ethiopia, Djibouti     Latin
  909.     ab Abkhazian            Georgia                         Cyrillic
  910.     am Amharic              Ethiopia                        Ethiopic
  911.     as Assamese             India, Nepal                    Bengali
  912.     ay Aymara               Bolivia, Peru, Chile            Latin
  913.  
  914.  
  915.  
  916.  
  917.  
  918. Alvestrand                 Expires May 6 93                  [Page 17]
  919.  
  920. draft            X.400 use of extended character sets           Apr 92
  921.  
  922.  
  923.     az Azerbaijani          SNC, Iran, Iraq, Turkey         Cyrillic, Arabic
  924.     ba Bashkir              SNC                             Cyrillic
  925.     bh Bihari               India                           Gujarati (or Kaithi)
  926.     bi Bislama              Vanuatu, New Caledonia          Latin
  927.     bn Bengali              India                           Bengali
  928.     co Corsican             France                          Latin
  929.     fj Fiji                 Fiji                            Latin
  930.     gd Scots                UK                              Latin
  931.     gn Guarani              Paraguay                        Latin
  932.     gu Gujarati             India                           Gujarati
  933.     ha Hausa                Nigeria, Niger, Chad, Sudan,... Latin
  934.     hi Hindi                India                           Devanagari
  935.     hy Armenian             Armenia                         Armenian
  936.     ia Interlingua          None (Artificial Language)      Latin
  937.     ie Interlingue          None (Artificial Language)      Latin
  938.     ik Inupiak              USA, Cannada                    Latin, Cree
  939.     in Indonesian           Indonesia                       Latin
  940.     ji Yiddish              Germany, USA, SNC, Israel       Hebrew
  941.     jw Javanese             Indonesia, Malaysia             Latin, Javanese
  942.     ka Georgian             Georgia                         Georgian
  943.     kk Kazakh               SNC, Afghanistan                Cyrillic, Arabic
  944.     km Cambodian            Cambodia                        Khmer
  945.     kn Kannada              India                           Kannada
  946.     ks Kashmiri             India, Pakistan                 Arabic
  947.     ku Kurdish              SNC, Turkey, Iraq, Iran         Cyrillic, Arabic
  948.     ky Kirghiz              SNC, China, Afghanistan         Cyrillic, Arabic
  949.     ln Lingala              CAR, Congo, Zaire               Latin
  950.     mg Malagasy             Madagascar, Comoro Islands      Latin, Arabic
  951.     mi Maori                New Zealand                     Latin
  952.     mk Macedonian           Greece, Yugoslavia              Greek, Cyrillic
  953.     ml Malayalam            India                           Malayalam
  954.     mn Mongolian            Mongolia                        Cyrillic, Mongolian
  955.     mo Moldavian            Romania                         Latin
  956.     mr Marathi              India                           Devanagari
  957.     ms Malay                Malaysia, Thailand              Latin
  958.     my Burmese              Myanmar                         Burmese
  959.     na Nauru                Nauru                           Latin
  960.     ne Nepali               Nepal                           Devanagari
  961.     oc Occitan              France                          Latin
  962.     or Oriya                India                           Oriya
  963.     pa Punjabi              India                           Gurmukhi
  964.     ps Pashto (Western)     Afghanistan, Iran               Arabic
  965.     qu Quechua              Peru                            Latin
  966.     rm Rhaeto               Swizerland                      Latin
  967.  
  968.  
  969.  
  970.  
  971.  
  972. Alvestrand                 Expires May 6 93                  [Page 18]
  973.  
  974. draft            X.400 use of extended character sets           Apr 92
  975.  
  976.  
  977.     rn Kirundi              Burundi, Uganda                 Latin
  978.     rw Kinyarwanda          Rwanda, Uganda, Zaire           Latin
  979.     sa Sanskrit             India                           Devanagari
  980.     sd Sindhi               Pakistan, India, Afghanistan    Arabic, Gurmukhi
  981.     sg Sangro               Central African Republic        Latin
  982.     si Singhalese           Sri Lanka                       Sinhalese
  983.     sm Samoan               Samoa, USA, New Zealand         Latin
  984.     sn Shona                Zimbabwe, Zambia, Mozambique    Latin
  985.     so Somali               Somalia, Ethiopia, Djibouti     Latin
  986.     sr Serbian              former Yugoslavia               Cyrillic
  987.     ss Siswati              S. Africa, Swaziland            Latin
  988.     st Sesotho              S. Africa, Lesotho              Latin
  989.     su Sudanese             Sudan                           Latin
  990.     ta Tamil                India, Malaysia                 Tamil
  991.     te Tegulu               India                           Telugu
  992.     tg Tajik                Tajikistan                      Arabic
  993.     ti Tigrinya             Ethiopia                        Latin, Ethiopic
  994.     tk Turkmen              SNC, Iran, Afghanistan          Cyrillic, Arabic
  995.     tl Tagalog              Phillipines                     Latin
  996.     tn Setswana             S. Africa, Botswana, Namibia    Latin
  997.     to Tonga (3)            Mozambique                      Latin
  998.     ts Tsonga               Mozambique, Swaziland           Latin
  999.     tt Tatar                SNC                             Cyrillic
  1000.     tw Twi (Ewe)            Ghana                           Latin
  1001.     uz Uzbek (Southern)     Afghanistan, Turkey             Arabic
  1002.     vi Vietnamese           Vietnam, Cambodia, China        Latin
  1003.     wo Wolof                Senegal, Mauritania             Latin
  1004.     xh Xhosa                S. Africa                       Latin
  1005.     yo Yoruba               Nigeria, Togo, Benin            Latin
  1006.     zu Zulu                 S. Africa, Lesotho, Malawi      Latin
  1007.  
  1008.  
  1009.     The information about languages in ISO 10646 was kindly supplied
  1010.     by Glenn Adams <glenn@metis.com>
  1011.  
  1012.     Languages for which the author does NOT know any proper character
  1013.     set include:
  1014.  
  1015.  
  1016.     bo Tibetan
  1017.     dz Bhutani
  1018.     et Estonian
  1019.     lt Lithuanian
  1020.     lv Latvian, Lettish
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026. Alvestrand                 Expires May 6 93                  [Page 19]
  1027.  
  1028. draft            X.400 use of extended character sets           Apr 92
  1029.  
  1030.  
  1031.     mt Maltese
  1032.     sh Serbo-Croatian
  1033.  
  1034.  
  1035.  
  1036.     6.  REFERENCES
  1037.  
  1038.  
  1039.     [ISO 4873]
  1040.          <<title coming>> 1991 revision.  Replaces ISO 2022
  1041.  
  1042.     [ISO 8859]
  1043.  
  1044.     [ISO 6937]
  1045.  
  1046.     [ISO 639]
  1047.  
  1048.     [X.209]
  1049.          CCITT Recommendation X.209(1988): Specification of Basic
  1050.          Encoding Rules for Abstract Syntax Notation One (ASN.1).
  1051.          Technically aligned with ISO 8825 and ISO 8825/AD 1.
  1052.  
  1053.     [ISO 10646]
  1054.  
  1055.     [RFC-2022-JP]
  1056.  
  1057.     [RFC-KELD]
  1058.  
  1059.  
  1060.     7.  Missing items   This section is intended as a memory aid for
  1061.     the author, and should be empty by the time the RFC is published.
  1062.  
  1063.     (1)  Get exact escape sequence information for ISO 10646
  1064.  
  1065.     (2)  Full titles in the references section
  1066.  
  1067.     (3)  Consider number of lines when listing extra chars in
  1068.          languages in cleartext
  1069.  
  1070.     (4)  Check Sami character set with Sami school
  1071.  
  1072.     (5)  Locate (Norwegian) editor of revision for ISO 639 and get
  1073.          language codes for Sorbian and Sami, if possible
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080. Alvestrand                 Expires May 6 93                  [Page 20]
  1081.  
  1082. draft            X.400 use of extended character sets           Apr 92
  1083.  
  1084.  
  1085.     (6)  Add MOTIS properly to reference list
  1086.  
  1087.     (7)  Add Johan van Wingen's E-mail address
  1088.  
  1089.     (8)  Number and reference entry for RFC-KELD
  1090.  
  1091.     (9)  Check for references to/copies of Johan van Wingen's work
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134. Alvestrand                 Expires May 6 93                  [Page 21]
  1135.  
  1136.  
  1137. ------------------------------ End of body part 2
  1138.